package ui;
import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

public class GameHistoryView extends JPanel {

	private JTextArea txtArea;
        private JScrollPane txtAreaScroll;
	
	public GameHistoryView() {
		init();
	}
	
	public void init() {
            setBorder(BorderFactory.createTitledBorder("History: "));
            setLayout(new GridLayout(1,0));

            txtArea = new JTextArea();
            txtArea.setEditable(false);
            txtAreaScroll = new JScrollPane(txtArea);
            add(txtAreaScroll);
	}
	
	public void setTxtArea(String string) {
            txtArea.insert(string, 0);
	}
}
